export const Local = {

    set_info: (data: any) => {

        localStorage.setItem('userinfo', JSON.stringify(data))
    },
    get_info: () => {
        let userinfo = localStorage.getItem('userinfo') as string
        if (!userinfo) return false
        return JSON.parse(userinfo)
    },
    remove_info: () => {
        localStorage.removeItem('userinfo')
    },
    set_collect: (data: any) => {
        localStorage.setItem('collect', JSON.stringify(data))
    },
    get_collect: () => {
        let collect = localStorage.getItem('collect') as string
        if (!collect) return false
        return JSON.parse(collect)
    },
    remove_collect: () => {
        localStorage.removeItem('collect')
    }

}
export const Admin = {
    set_Admin: (data: any) => {
        localStorage.setItem('admin', JSON.stringify(data))
    },
    get_Admin: () => {
        let userinfo = localStorage.getItem('admin') as string
        if (!userinfo) return false
        return JSON.parse(userinfo)
    },
    remove_Admin: () => {
        localStorage.removeItem('admin')
    }
}